home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Softshoe / Lisa's Mac Parts / Files / Directories / CatInfoLoop.cp < prev    next >
Text File  |  2000-06-23  |  609b  |  34 lines

  1. // FileLoop.cp
  2.  
  3. #ifndef CatInfoLoop_h
  4. #include "CatInfoLoop.h"
  5. #endif
  6.  
  7. CatInfoLoop::CatInfoLoop()
  8.   : directory( Volume( 0 ) ),
  9.      unfinished( false )
  10.   {
  11.   }
  12.  
  13. CatInfoLoop::CatInfoLoop( Directory theDirectory )
  14.   : directory( theDirectory ),
  15.      index( 1 )
  16.   {
  17.     unfinished = info.TryToGet( directory, index );
  18.   }
  19.  
  20. void CatInfoLoop::Start( Directory theDirectory )
  21.   {
  22.     directory = theDirectory;
  23.     index = 1;
  24.     unfinished = info.TryToGet( directory, index );
  25.   }
  26.  
  27. void CatInfoLoop::operator++()
  28.   {
  29.     Assert( unfinished );
  30.     Assert( index < maxint16 );
  31.     index++;
  32.     unfinished = info.TryToGet( directory, index );
  33.   }
  34.